home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2001 May / SGI IRIX Base Documentation 2001 May.iso / usr / share / catman / p_man / cat3 / perl5 / File::CheckTree.z / File::CheckTree
Encoding:
Text File  |  1998-10-30  |  2.0 KB  |  67 lines

  1.  
  2.  
  3.  
  4. FFFFiiiilllleeee::::::::CCCChhhheeeecccckkkkTTTTrrrreeeeeeee((((3333))))                                          FFFFiiiilllleeee::::::::CCCChhhheeeecccckkkkTTTTrrrreeeeeeee((((3333))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      validate - run many filetest checks on a tree
  10.  
  11. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  12.          use File::CheckTree;
  13.  
  14.          $warnings += validate( q{
  15.              /vmunix                 -e || die
  16.              /boot                   -e || die
  17.              /bin                    cd
  18.                  csh                 -ex
  19.                  csh                 !-ug
  20.                  sh                  -ex
  21.                  sh                  !-ug
  22.              /usr                    -d || warn "What happened to $file?\n"
  23.          });
  24.  
  25.  
  26. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  27.      The _v_a_l_i_d_a_t_e() routine takes a single multiline string consisting of
  28.      lines containing a filename plus a file test to try on it.  (The file
  29.      test may also be a "cd", causing subsequent relative filenames to be
  30.      interpreted relative to that directory.)  After the file test you may put
  31.      || die to make it a fatal error if the file test fails.  The default is
  32.      || warn.  The file test may optionally have a "!' prepended to test for
  33.      the opposite condition.  If you do a cd and then list some relative
  34.      filenames, you may want to indent them slightly for readability.  If you
  35.      supply your own _d_i_e() or _w_a_r_n() message, you can use $file to interpolate
  36.      the filename.
  37.  
  38.      Filetests may be bunched:  "-rwx" tests for all of -r, -w, and -x.  Only
  39.      the first failed test of the bunch will produce a warning.
  40.  
  41.      The routine returns the number of warnings issued.
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.